package xyz.boot.ssm.modules.mybatis.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@Slf4j
public class MyExceptionHandler {


    @ExceptionHandler(Exception.class)
    @ResponseBody
    public String onException(Exception e){
        log.info(e.getMessage());
        return "e";
    }

}
